package code19_jdk8;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Test01 {

	public static void main(String[] args) {
		// <= jdk6
		List<String> list = new ArrayList<String>();
		// jdk7 类型推断
		List<String> list2 = new ArrayList<>();
		
		// jdk8 类型推断改进
		Serializable pick = pick("abc", new ArrayList<String>());
		Object pick2 = pick("abc", new Test01());
	}
	
	public static <T> T pick(T t1, T t2) {
		return t1;
	}
	
}
